//
//  CedarTableViewSectionMaker.h
//  CedarFinancePH
//
//  Created by lshenrong on 2018/3/20.
//  Copyright © 2018年 cedarhd. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "CedarBaseTableViewDataSource.h"



/**
 tableview cell model
 */
@interface CedarDataSourceSection : NSObject


/**
 数据
 */
@property(nonatomic,strong) NSArray *data;

/**
 cell
 */
@property(nonatomic,strong) Class cell;


/**
 cell identifier
 */
@property(nonatomic,strong) NSString *identifier;


/**
 适配器 update cell data
 */
@property(nonatomic,copy) AdapterBlock adapter;

/**
 cell 数据
 */
@property(nonatomic,copy) EventBlock event;

/**
 cell静态高度
 */
@property(nonatomic, assign) CGFloat staticHeight;

/**
 是否自动计算cell高度
 */
@property(nonatomic, assign) BOOL isAutoHeight;

@property(nonatomic,strong) NSString * headerTitle;
@property(nonatomic,strong) NSString * footerTitle;
@property(nonatomic,strong) UIView * headerView;
@property(nonatomic,strong) UIView * footerView;
@property(nonatomic, assign) UITableViewCellStyle tableViewCellStyle;

@end



@interface CedarTableViewSectionMaker : NSObject

@property(nonatomic,strong) CedarDataSourceSection *section;

- (CedarTableViewSectionMaker *(^)(Class))cell;
- (CedarTableViewSectionMaker *(^)(NSArray *))data;
- (CedarTableViewSectionMaker *(^)(void(^)(CedarBaseTableViewCell *cell, id data, NSUInteger index)))adapter;
- (CedarTableViewSectionMaker *(^)(CGFloat))height;
- (CedarTableViewSectionMaker *(^)(void))autoHeight;
- (CedarTableViewSectionMaker *(^)(void(^)(NSUInteger index, id data)))event;
- (CedarTableViewSectionMaker *(^)(NSString *))headerTitle;
- (CedarTableViewSectionMaker *(^)(NSString *))footerTitle;
- (CedarTableViewSectionMaker *(^)(UIView * (^)(void)))headerView;
- (CedarTableViewSectionMaker *(^)(UIView * (^)(void)))footerView;



@end
